Import mojo
Import diddy
Import model
Import linkButton

Class MainMenuScreen Extends Screen

	Field linkButtonsList:ArrayList<LinkButton> = New ArrayList<LinkButton>
	
	Method New()
		name = "MainMenuScreen"
				Local button0:LinkButton = LinkButton.Create(game.images.Find("collectStar"),"QUICK START", SCREEN_WIDTH2+10, SCREEN_HEIGHT2-100,New QuickMainMenuLink(),0, 3, linkButtonsList)

		Local button1:LinkButton = LinkButton.Create(game.images.Find("collectStar"),"START", SCREEN_WIDTH2+10, SCREEN_HEIGHT2-50,New MainMenuLink(),0, 0, linkButtonsList)
		Local button2:LinkButton = LinkButton.Create(game.images.Find("collectStar"),"PLAY BONUS ROUNDS", SCREEN_WIDTH2+10, SCREEN_HEIGHT2,New BonusRoundsLink(),0, 1, linkButtonsList)
		Local button3:LinkButton = LinkButton.Create(game.images.Find("collectStar"),"HELP", SCREEN_WIDTH2+10, SCREEN_HEIGHT2+50,New MainMenuLink(),0,  2, linkButtonsList)

	End
	
	Method Start:Void()
		LinkButton.StartAll(linkButtonsList)
	'	game.screenFade.Start(50, false)		
	End
	
	Method Render:Void()
		Cls
		DrawText("SUPER MATH", 5, SCREEN_HEIGHT2,0,0.5)
		DrawText("ADVENTURE!", 20, SCREEN_HEIGHT2+50,0,0.5)

		LinkButton.DrawAll(linkButtonsList)
	End
	
	Method Update:Void()
	LinkButton.UpdateAll(linkButtonsList)

	End
End

Class MainMenuLink Extends ButtonEvent
	Method OnClicked:Void()
		_model.gameMode = Model.GAME_MODE_MAIN
		
		game.nextScreen = _model._setDifficultyScreen
		game.screenFade.Start(50, true)
	End
End
Class QuickMainMenuLink Extends ButtonEvent
	Method OnClicked:Void()
		_model.gameMode = Model.GAME_MODE_MAIN
		
		game.nextScreen = _model._mazeScreen
		game.screenFade.Start(50, true)
	End
End

Class BonusRoundsLink Extends ButtonEvent
	Method OnClicked:Void()
		game.nextScreen = _model._introScreen
		game.screenFade.Start(50, true)
	End
End